<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title><%= @pagetitle || (@page && @page.title) || 'Learning Rails Sample Application' %></title>
		<%= stylesheet_link_tag 'learningrails' %>
	</head>
	<body>
		<div id='pagewrapper'>
			<div id='header'>
				<p>Learning Rails Sample Application</p>
			</div>
			<div id='navbar'>
				<ul>
					<% @tabs.each do |page| -%>
						<li><%= link_to page.title, view_page_path(page.name) %></li>
					<% end -%>
					<li><% if logged_in? %>
								<%= link_to 'Log Out', logout_path %>
							<% else %>
								<%= link_to 'Log In', login_path %>
							<% end %>
					</li>
				</ul>
			</div>
		<div id='content'>
			<h2><%= flash[:notice] %></h2>
			<%= yield %>
		</div>
		<div id='footer'>
			<p>Learning Rails Sample Application</p>
		</div>
	</div>
	</body>
</html>

